import request from "@/utils/request";
import Qs from 'qs';

export function login(username, password) {
    return new Promise((resolve, reject) => {
        request.post("login", Qs.stringify({
            username,
            password
        })).then(response => {
            resolve(response.data);
        }).catch(err => {
            reject(err);
        })
    })
}